// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 修改菜单 PUT /api/system/menu */
export async function menuEditUsingPUT(body: API.SysMenu, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/menu', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增菜单 POST /api/system/menu */
export async function menuAddUsingPOST(body: API.SysMenu, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/menu', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据菜单编号获取详细信息 GET /api/system/menu/${param0} */
export async function menuGetInfoUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.menuGetInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  const { menuId: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/menu/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 删除菜单 DELETE /api/system/menu/${param0} */
export async function menuRemoveUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.menuRemoveUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { menuId: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/menu/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取菜单列表 GET /api/system/menu/list */
export async function menuListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.menuListUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<Record<string, any>>('/api/system/menu/list', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 加载对应角色菜单列表树 GET /api/system/menu/roleMenuTreeSelect/${param0} */
export async function menuRoleMenuTreeSelectUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.menuRoleMenuTreeSelectUsingGETParams,
  options?: { [key: string]: any },
) {
  const { roleId: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/menu/roleMenuTreeSelect/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取菜单下拉树列表 GET /api/system/menu/treeSelect */
export async function menuTreeSelectUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.menuTreeSelectUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<Record<string, any>>('/api/system/menu/treeSelect', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}
